<template>
  <div class="independent-project-container">
    <el-page-header @back="goBack" />
    <!-- 白色背景盒子 -->
    <div class="content-box">
      <!-- 主标题 -->
      <h1 class="main-title">租赁厂房项目</h1>
      <el-divider />
      
      <!-- 次级标题 -->
      <h2 class="sub-title">基本信息</h2>
      <el-divider />
      
      <!-- 基本信息描述 -->
      <el-descriptions :column="1" border>
        <el-descriptions-item label="事项类型">
          <el-tag type="primary">行政许可</el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="实施主体">
          市发展和改革委员会
        </el-descriptions-item>
        <el-descriptions-item label="承诺办结时限">
          20个工作日
        </el-descriptions-item>
        <el-descriptions-item label="咨询方式">
          <div class="contact-info">
            <p>电话：0571-12345678</p>
            <p>邮箱：project@example.com</p>
          </div>
        </el-descriptions-item>
        <el-descriptions-item label="办理时间">
          工作日 上午9:00-12:00，下午13:30-17:30
        </el-descriptions-item>
        <el-descriptions-item label="办理地点">
          市民中心L座3楼投资项目审批窗口
        </el-descriptions-item>
      </el-descriptions>

      <h3 class="sub-title">办理流程</h3>
      <el-divider />
     
    <el-steps :active="0" direction="vertical" space="50px">
    <el-step>
      <template #title>
        <span class="custom-step-title">签订投资协议（投资促进局）</span>
      </template>
    </el-step>
    
    <el-step>
      <template #title>
        <span class="custom-step-title">企业设立登记（行政审批局）</span>
      </template>
    </el-step>
    
    <el-step>
      <template #title>
        <span class="custom-step-title">办理项目备案（行政审批局）</span>
      </template>
    </el-step>
    
    <el-step>
      <template #title>
        <span class="custom-step-title">同步办理</span>
      </template>
      <template #description>
        <div class="parallel-process">
          <ul>
            <li>环评（县生态环境局）</li>
            <li>安评</li>
            <li>能评</li>
            <li>水土保持等事项（行政审批局）</li>
          </ul>
        </div>
      </template>
    </el-step>
  </el-steps>

        <h4 class="sub-title">申请材料</h4>
      <el-divider />
      
      <el-table :data="contractMaterials" border style="width: 100%">
        <el-table-column prop="name" label="材料名称" width="330" />
        <el-table-column prop="source" label="来源渠道" width="200" />
        <el-table-column prop="type" label="材料类型" width="180" />
        <el-table-column prop="format" label="材料形式" />
        <el-table-column prop="copies" label="纸质材料份数" width="150" align="center" />
      </el-table>

       <!-- 新增的申请按钮 -->
      <div class="action-footer">
        <el-button 
          type="primary" 
          size="large"
          @click="handleApply"
          class="apply-button"
        >
          申请办理
        </el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()
const goBack = () => {
  router.go(-1)
}

// 项目签约阶段材料
const contractMaterials = [
  {
    name: '投资协议书',
    source: '投资促进局提供',
    type: '原件',
    format: '纸质文件',
    copies: '3份'
  },
   {
    name: '建设项目环境影响报告表',
    source: '县生态环境局核发',
    type: '原件',
    format: '纸质+电子版',
    copies: '3份'
  },
  {
    name: '安全评价报告',
    source: '县生态环境局核发',
    type: '原件',
    format: '纸质+电子版',
    copies: '3份'
  },
  {
    name: '节能评估报告书',
    source: '县生态环境局核发',
    type: '原件',
    format: '纸质+电子版',
    copies: '3份'
  },
  {
    name: '水土保持方案报告书',
    source: '县生态环境局核发',
    type: '原件',
    format: '纸质+电子版',
    copies: '3份'
  }
]


const handleApply = () => {

    router.push('/rentalapply')

}
</script>

<style scoped>
.independent-project-container {
  padding: 20px;
  background-color: #f5f7fa;
  min-height: calc(100vh - 40px);
}

.content-box {
  background-color: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  text-align: left;
}

.main-title {
  font-size: 24px;
  color: #333;
  margin: 0 0 10px 0;
}

.sub-title {
  font-size: 18px;
  color: #666;
  margin: 20px 0 10px 0;
}

.el-divider {
  margin: 15px 0;
}

.el-descriptions {
  margin-top: 20px;
}

.contact-info p {
  margin: 5px 0;
}

.process-step {
  padding-left: 20px;
  line-height: 2;
}

/* 表格样式 */
:deep(.el-table) {
  margin-top: 20px;
}

:deep(.el-table__header) {
  background-color: #f5f7fa;
}

:deep(.el-table th) {
  color: #333;
  font-weight: 500;
}

:deep(.el-table--border) {
  border-color: #ebeef5;
}

:deep(.el-table--border .el-table__cell) {
  border-color: #ebeef5;
}

:deep(.el-table--enable-row-hover .el-table__body tr:hover>td) {
  background-color: #f0f7ff;
}

/* 步骤条样式 */
:deep(.el-steps) {
  padding: 20px;
}

:deep(.el-step__head) {
  width: 24px;
}

:deep(.el-step__title) {
  font-size: 16px;
  font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-box {
    padding: 20px;
  }
  
  .main-title {
    font-size: 20px;
  }
  
  .sub-title {
    font-size: 16px;
  }
  
  :deep(.el-step__title) {
    font-size: 14px;
  }
}

/* 新增按钮样式 */
.action-footer {
  margin-top: 40px;
  text-align: center;
  padding: 20px 0;
}

.apply-button {
  width: 200px;
  height: 50px;
  font-size: 16px;
}

.apply-button .el-icon {
  margin-right: 8px;
}

</style>